package com.cogwheel.framework.graphics.ui;

import com.cogwheel.framework.graphics.CSprite;
import com.cogwheel.framework.init.CPreferences;
import com.cogwheel.framework.util.CPoint;
import com.cogwheel.framework.util.CRectangle;
import com.cogwheel.framework.util.input.CKeyboard;
import com.cogwheel.framework.util.input.CMouse;

public class CCursor extends CSprite {

	public CCursor(CPreferences preferences, String spriteID, CPoint dimensions) {
		super(preferences, spriteID, new CRectangle(1, 1, dimensions.x, dimensions.y));
	}
	
	@Override
	public void CUpdate(CMouse mouse, CKeyboard keyboard){
		CPoint cPos = mouse.CWGGetMouseCoords();
		this.Dimensions.CWGSetPosition(new CPoint(cPos.x + Dimensions.width/2, cPos.y + Dimensions.height/2));
	}
}
